%!TEX program = pdflatex
\documentclass{standalone}
\usepackage[UTF8]{ctex}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{mathdots}
\usepackage{yhmath}
\usepackage{cancel}
\usepackage{color}
\usepackage{siunitx}
\usepackage{array}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{gensymb}
\usepackage{tabularx}
\usepackage{booktabs}
\usetikzlibrary{fadings}
\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt    

\begin{document}


\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,635.1999969482422); %set diagram left start at 0, and has height of 635.1999969482422

%Shape: Axis 2D [id:dp4120746953389226] 
\draw  (110,322) -- (514,322)(296.31,48) -- (296.31,322) (507,317) -- (514,322) -- (507,327) (291.31,55) -- (296.31,48) -- (301.31,55) (356.31,317) -- (356.31,327)(416.31,317) -- (416.31,327)(476.31,317) -- (476.31,327)(236.31,317) -- (236.31,327)(176.31,317) -- (176.31,327)(116.31,317) -- (116.31,327)(291.31,262) -- (301.31,262)(291.31,202) -- (301.31,202)(291.31,142) -- (301.31,142)(291.31,82) -- (301.31,82) ;
\draw   ;
%Curve Lines [id:da6967715292939296] 
\draw [color={rgb, 255:red, 236; green, 20; blue, 20 }  ,draw opacity=1 ] [dash pattern={on 4.5pt off 4.5pt}]  (146,164) .. controls (194.12,200.27) and (261.12,323.27) .. (472,318) ;


%Straight Lines [id:da6247532185874302] 
\draw [color={rgb, 255:red, 83; green, 11; blue, 146 }  ,draw opacity=1 ][line width=0.75]    (146,164) -- (296.31,322) ;


%Straight Lines [id:da7759744261392736] 
\draw [color={rgb, 255:red, 83; green, 11; blue, 146 }  ,draw opacity=1 ][line width=0.75]    (296.31,322) -- (476,322) ;


%Straight Lines [id:da2551860402436108] 
\draw  [dash pattern={on 4.5pt off 4.5pt}]  (108,261) -- (298,262) ;


%Straight Lines [id:da07504692049090578] 
\draw  [dash pattern={on 4.5pt off 4.5pt}]  (296.31,322) -- (296,262) ;


%Straight Lines [id:da37739660760823746] 
\draw [color={rgb, 255:red, 16; green, 213; blue, 112 }  ,draw opacity=1 ] [dash pattern={on 0.84pt off 2.51pt}]  (186,148) -- (356,322) ;


%Shape: Parabola [id:dp8487526468269919] 
\draw  [color={rgb, 255:red, 133; green, 125; blue, 27 }  ,draw opacity=1 ][dash pattern={on 4.5pt off 4.5pt}] (254,140) .. controls (322,382.67) and (390,382.67) .. (458,140) ;
%Shape: Rectangle [id:dp8853074557519744] 
\draw   (340,14) -- (464,14) -- (464,132) -- (340,132) -- cycle ;
%Straight Lines [id:da9719288566178766] 
\draw [color={rgb, 255:red, 235; green, 22; blue, 22 }  ,draw opacity=1 ] [dash pattern={on 4.5pt off 4.5pt}]  (344,31) -- (374,32.12) ;


%Straight Lines [id:da9400124368084969] 
\draw [color={rgb, 255:red, 20; green, 197; blue, 187 }  ,draw opacity=1 ] [dash pattern={on 0.84pt off 2.51pt}]  (343,52) -- (373,52.12) ;


%Straight Lines [id:da11276868437663712] 
\draw [color={rgb, 255:red, 20; green, 102; blue, 197 }  ,draw opacity=1 ]   (344,75.88) -- (374,76) ;


%Straight Lines [id:da4794207900666839] 
\draw [color={rgb, 255:red, 150; green, 160; blue, 57 }  ,draw opacity=1 ] [dash pattern={on 4.5pt off 4.5pt}]  (344,94.88) -- (376,95) ;


%Straight Lines [id:da4647786376802677] 
\draw [color={rgb, 255:red, 150; green, 160; blue, 57 }  ,draw opacity=1 ] [dash pattern={on 4.5pt off 4.5pt}]  (344,116) -- (376,116.12) ;



% Text Node
\draw (299,330.5) node [scale=0.8]  {$0$};
% Text Node
\draw (358,335) node [scale=0.8]  {$1$};
% Text Node
\draw (418,334) node [scale=0.8]  {$2$};
% Text Node
\draw (479,334) node [scale=0.8]  {$3$};
% Text Node
\draw (235,333) node [scale=0.8]  {$-1$};
% Text Node
\draw (175.5,333) node [scale=0.8]  {$-2$};
% Text Node
\draw (115.5,333) node [scale=0.8]  {$-3$};
% Text Node
\draw (287,260) node [scale=0.8]  {$1$};
% Text Node
\draw (287,202) node [scale=0.8]  {$2$};
% Text Node
\draw (288,142) node [scale=0.8]  {$3$};
% Text Node
\draw (288,82) node [scale=0.8]  {$4$};
% Text Node
\draw (298,347.5) node   {$yf(\mathbf{x} ,\mathbf{w})$};
% Text Node
\draw (310,60.5) node   {$\mathcal{L}$};
% Text Node
\draw (420.5,31) node  [align=left] {交叉熵损失};
% Text Node
\draw (417,53) node  [align=left] {hing 损失};
% Text Node
\draw (419.5,75) node  [align=left] {感知器损失};
% Text Node
\draw (412,97) node  [align=left] {平方损失};
% Text Node
\draw (409,117) node  [align=left] {0-1损失};


\end{tikzpicture}


\end{document}
